<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand"
               href="<?= \yii\helpers\Url::to(['/admin/']); ?>"><?= \app\components\Lcms::getName() ?></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <?php
                /// print_r($model->menu);  var_dump($model->now);exit;

                foreach ($model->menu as $key => $mvo) {

                    if (isset($mvo['list'])) {
                        ?>
                        <li class="dropdown <?php if ($key === $model->now) echo 'active'; ?>">
                            <a href="<?= $mvo['href'] ?>" class="dropdown-toggle" data-toggle="dropdown"
                               role="button" aria-expanded="false"><?= $mvo['title'] ?><span class="caret"></span></a>
                            <ul class="dropdown-menu " role="menu">
                                <?php foreach ($mvo['list'] as $vo) { ?>
                                    <li><a href="<?= $vo['href'] ?>"><?= $vo['title'] ?></a></li>
                                <?php } ?>
                            </ul>
                        </li>
                        <?php

                    } else {
                        ?>
                        <li <?php if ($key === $model->now) echo 'class="active"'; ?>><a
                                    href="<?= $mvo['href'] ?>"><?= $mvo['title'] ?></a></li>
                        <?php
                    }
                }
                ?>
            </ul>
            </li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
<?php /*
<ul class="admin_menu"><?php
///print_r($model->menu);exit;
foreach ($model->menu as $key=>$vo){
    ?>
    <li class="mli <?php if($key===$model->now) echo 'on'; ?>"><a <?php if(isset($vo['href'])){
        
        
        echo 'href="'.$vo['href'].'"';
        
        
    } ?>><?php echo $vo['title'] ?></a></li> 
        <?php
}
 ?></ul>
    */ ?>